/**
 * 
 */
package com.xbang.attendance.utils;

import java.util.Comparator;

import com.xbang.attendance.entity.system.Menu;

/**
 * @author dev.zhang
 * 
 */
public class ComparatorMenu implements Comparator<Menu> {

	public int compare(Menu sourceMenu, Menu indentMenu) {
		if (sourceMenu.getMenuIndex() > indentMenu.getMenuIndex()) {
			return 1;
		} else if (sourceMenu.getMenuIndex() < indentMenu.getMenuIndex()) {
			return -1;
		}
		return 0;
	}

}
